{extend name="layouts/defatul" /}  <!--模板继承defatul，减少代码复用-->

{block name="title"}登录页{/block}<!--登录页 -->

{block name="content"}
<div class="row">
    <div class="offset-md-2 col-md-8">
        <div class="card">
            <div class="card-header h5 text-center">
                <i class="fa fa-user-circle-o text-success"></i>&nbsp;用户登录
            </div>
            <div class="card-body">
                {include file="shared/_errors" /}
                <form method="post" action="{:url('login.save')}">
                    {:token_field()}<!--防止CSRF攻击-->

                    <div class="mb-3">
                        <label for="email" class="form-label">邮箱</label>
                        <input type="email" required maxlength="255" value="{:session('old.email')}"
                               placeholder="请输入您的邮箱账号" class="form-control" id="email" name="email" >
                    </div>
                    <div class="mb-3">
                        <label for="password" class="form-label">密码</label>
                        <input type="password" required minlength="6" maxlength="255"
                               placeholder="请输入您的密码" name="password" class="form-control" id="password">
                    </div>
                    <div class="mb-3 form-check">
                        <input type="checkbox" class="form-check-input"
                               id="remember_me" name="remember_me">
                        <label class=" form-check-label" for="remember_me">记住我
                        </label>
                    </div>
                    <div class="mb-3 d-flex justify-content-center">
                        <button type="submit" class="btn btn-primary" >登录</button>
                    </div>
                </form>
            </div>
            <div class="card-footer d-flex justify-content-between align-items-center   ">

                <div>
                还没有账号?<a class="text-decoration-none" href="{:url('User/create')}">现在注册!</a>
                </div>
                <div>
                    <a class="text-decoration-none text-danger" href="{:url('password.request')}">忘记密码?</a>
                </div>
            </div>
        </div>
    </div>
</div>
{/block}